package com.aiwiown.face.request.faceid;

import com.aiwiown.face.ApiMethod;
import com.aiwiown.face.ApiObject;
import com.aiwiown.face.ApiRequest;
import com.aiwiown.face.internal.util.RequestParamUtils;
import com.aiwiown.face.response.faceid.OCRBankCardV3Response;

import java.util.Map;

/**
 * <pre>
 * </pre>
 * OCRBankCardV3Request
 * Date: 2020/7/21 0021
 * Time: 11:01
 *
 * @author tang.xiaosheng@qq.com
 */
public class OCRBankCardV3Request implements ApiRequest<OCRBankCardV3Response> {

    private String apiVersion = "v3";
    private static String apiUrl = "/ocrbankcard";
    private String bizContent;
    private ApiObject bizModel = null;

    @Override
    public ApiMethod getApiMethod() {
        return ApiMethod.POST;
    }

    @Override
    public String getApiUrl() {
        return "/" + this.apiVersion + apiUrl;
    }

    @Override
    public Map<String, String> getTextParams() throws IllegalAccessException {
        return RequestParamUtils.getTextParams(this.bizModel);
    }

    @Override
    public Map<String, byte[]> getByteArrayParams() throws IllegalAccessException {
        return RequestParamUtils.getByteArrayParams(this.bizModel);
    }

    @Override
    public String getApiVersion() {
        return this.apiVersion;
    }

    @Override
    public Class<OCRBankCardV3Response> getResponseClass() {
        return OCRBankCardV3Response.class;
    }

    @Override
    public String getBizContent() {
        return this.bizContent;
    }

    public void setBizModel(ApiObject bizModel) {
        this.bizModel = bizModel;
    }

    @Override
    public String signVersion() {
        return null;
    }

    @Override
    public String getSignInfo(String apiKey, String secretKey) throws Exception {
        return null;
    }
}
